package chapter4;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class MyAddress {

    public static void main(String[] args) {
        InetAddress localHost = null;
        try {
            localHost = InetAddress.getLocalHost();
            System.out.println(localHost);
        } catch (UnknownHostException e) {
            System.out.println("Could not find this computer's address");
        }
    }

}
